package com.zwy.utils;

import com.zwy.domain.response.ResponseResult;

import java.util.function.Supplier;

/**
 * @author zwy
 * @version 1.0
 * @description: ControllerUtils
 * @date 2025/9/19 11:39
 */
public class ControllerUtils {
    /**
     * 统一处理返回结果
     * @param supplier
     * @param <T>
     * @return
     */
    public static  <T> ResponseResult<T> messageHandler(Supplier<T> supplier) {
          return ResponseResult.success(supplier.get());

    }
}
